//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { AppAccessToken, AppAccessTokenResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooAppAccessTokenList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<AppAccessTokenResponse>(`/uctoo/app_access_token/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooAppAccessToken = async (id: string) => {
  return requestClient.get<AppAccessToken>(`/uctoo/app_access_token/${id}`);
};

export const adductooAppAccessToken = async (data: Partial<AppAccessToken>) => {
  return requestClient.post<AppAccessToken>('/uctoo/app_access_token/add', data);
};

export const edituctooAppAccessToken = async (data: Partial<AppAccessToken>) => {
  return requestClient.post<AppAccessToken>('/uctoo/app_access_token/edit', data);
};

export const deleteuctooAppAccessToken = async (id: string) => {
  return requestClient.post<any>('/uctoo/app_access_token/del', { id });
};
